﻿using DongFangGuoKai.TaskPlatform.Commn.Attributes;
using DongFangGuoKai.TaskPlatform.Domain;
using Quartz;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DongFangGuoKai.TaskPlatform.Job
{

    [Job("系统任务", "日志清理", "0 0 2 1 */3 ?，表示在每间隔3个月的1日的凌晨2点调整任务")]
    public class DeleteLogJob : IJob
    {
        public ISqlSugarClient _client { get; set; }


        public async Task Execute(IJobExecutionContext context)
        {
            //表中数据全部清空，清空，自增初始化
            _client.DbMaintenance.TruncateTable<Nlog>();

            await Task.CompletedTask;
        }



    }
}
